<template>
  <div class="person">
    <h1>{{number}}</h1>
    <button @click="update()">递增</button>
  </div>

</template>
<script lang="ts" setup name="person">
  import { ref } from 'vue'
  let number = ref(0);

  // 方法区
  function update () {
    number.value += 1;
    console.log("更新方法=>", number.value);
  }
</script>

<style scoped>
  .person {
    background-color: aquamarine;
  }

  h1 {
    color: red;
    text-align: center;
    font-size: 80px;
    line-height: 200px;
    /* border: 1px solid blue; */
    margin: auto auto;
  }

  button {
    margin-top: 10px;
    width: 100%;
    height: 60px;
    border: unset;
    font-size: 20px;
    color: rgba(255, 1, 221, 0.533);
    background-color: rgba(248, 172, 8, 0.533);
  }
</style>